3.10 \(\int \frac{1}{1+a^2+2 a x^2+x^4} \, dx\)

Optimal. Leaf size=299 \[ -\frac{\log \left (-\sqrt{2} \sqrt{\sqrt{a^2+1}-a} x+\sqrt{a^2+1}+x^2\right )}{4 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}-a}}+\frac{\log \left (\sqrt{2} \sqrt{\sqrt{a^2+1}-a} x+\sqrt{a^2+1}+x^2\right )}{4 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}-a}}-\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a^2+1}-a}-\sqrt{2} x}{\sqrt{\sqrt{a^2+1}+a}}\right )}{2 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}+a}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a^2+1}-a}+\sqrt{2} x}{\sqrt{\sqrt{a^2+1}+a}}\right )}{2 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}+a}} \]

[Out]

-ArcTan[(Sqrt[-a + Sqrt[1 + a^2]] - Sqrt[2]*x)/Sqrt[a + Sqrt[1 + a^2]]]/(2*Sqrt[2]*Sqrt[1 + a^2]*Sqrt[a + Sqrt
[1 + a^2]]) + ArcTan[(Sqrt[-a + Sqrt[1 + a^2]] + Sqrt[2]*x)/Sqrt[a + Sqrt[1 + a^2]]]/(2*Sqrt[2]*Sqrt[1 + a^2]*
Sqrt[a + Sqrt[1 + a^2]]) - Log[Sqrt[1 + a^2] - Sqrt[2]*Sqrt[-a + Sqrt[1 + a^2]]*x + x^2]/(4*Sqrt[2]*Sqrt[1 + a
^2]*Sqrt[-a + Sqrt[1 + a^2]]) + Log[Sqrt[1 + a^2] + Sqrt[2]*Sqrt[-a + Sqrt[1 + a^2]]*x + x^2]/(4*Sqrt[2]*Sqrt[
1 + a^2]*Sqrt[-a + Sqrt[1 + a^2]])

________________________________________________________________________________________

Rubi [A]  time = 0.307804, antiderivative size = 299, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 5, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.312, Rules used = {1094, 634, 618, 204, 628} \[ -\frac{\log \left (-\sqrt{2} \sqrt{\sqrt{a^2+1}-a} x+\sqrt{a^2+1}+x^2\right )}{4 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}-a}}+\frac{\log \left (\sqrt{2} \sqrt{\sqrt{a^2+1}-a} x+\sqrt{a^2+1}+x^2\right )}{4 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}-a}}-\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a^2+1}-a}-\sqrt{2} x}{\sqrt{\sqrt{a^2+1}+a}}\right )}{2 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}+a}}+\frac{\tan ^{-1}\left (\frac{\sqrt{\sqrt{a^2+1}-a}+\sqrt{2} x}{\sqrt{\sqrt{a^2+1}+a}}\right )}{2 \sqrt{2} \sqrt{a^2+1} \sqrt{\sqrt{a^2+1}+a}} \]

Antiderivative was successfully verified.

[In]

Int[(1 + a^2 + 2*a*x^2 + x^4)^(-1),x]

[Out]

-ArcTan[(Sqrt[-a + Sqrt[1 + a^2]] - Sqrt[2]*x)/Sqrt[a + Sqrt[1 + a^2]]]/(2*Sqrt[2]*Sqrt[1 + a^2]*Sqrt[a + Sqrt
[1 + a^2]]) + ArcTan[(Sqrt[-a + Sqrt[1 + a^2]] + Sqrt[2]*x)/Sqrt[a + Sqrt[1 + a^2]]]/(2*Sqrt[2]*Sqrt[1 + a^2]*
Sqrt[a + Sqrt[1 + a^2]]) - Log[Sqrt[1 + a^2] - Sqrt[2]*Sqrt[-a + Sqrt[1 + a^2]]*x + x^2]/(4*Sqrt[2]*Sqrt[1 + a
^2]*Sqrt[-a + Sqrt[1 + a^2]]) + Log[Sqrt[1 + a^2] + Sqrt[2]*Sqrt[-a + Sqrt[1 + a^2]]*x + x^2]/(4*Sqrt[2]*Sqrt[
1 + a^2]*Sqrt[-a + Sqrt[1 + a^2]])

Rule 1094

Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r = Rt[2*q - b/c, 2]}
, Dist[1/(2*c*q*r), Int[(r - x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(r + x)/(q + r*x + x^2), x], x
]]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && NegQ[b^2 - 4*a*c]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{1}{1+a^2+2 a x^2+x^4} \, dx &=\frac{\int \frac{\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}-x}{\sqrt{1+a^2}-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{2 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}+\frac{\int \frac{\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}+x}{\sqrt{1+a^2}+\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{2 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}\\ &=\frac{\int \frac{1}{\sqrt{1+a^2}-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{4 \sqrt{1+a^2}}+\frac{\int \frac{1}{\sqrt{1+a^2}+\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{4 \sqrt{1+a^2}}-\frac{\int \frac{-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}+2 x}{\sqrt{1+a^2}-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}+\frac{\int \frac{\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}+2 x}{\sqrt{1+a^2}+\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2} \, dx}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}\\ &=-\frac{\log \left (\sqrt{1+a^2}-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2\right )}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}+\frac{\log \left (\sqrt{1+a^2}+\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2\right )}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 \left (a+\sqrt{1+a^2}\right )-x^2} \, dx,x,-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}+2 x\right )}{2 \sqrt{1+a^2}}-\frac{\operatorname{Subst}\left (\int \frac{1}{-2 \left (a+\sqrt{1+a^2}\right )-x^2} \, dx,x,\sqrt{2} \sqrt{-a+\sqrt{1+a^2}}+2 x\right )}{2 \sqrt{1+a^2}}\\ &=-\frac{\tan ^{-1}\left (\frac{\sqrt{-a+\sqrt{1+a^2}}-\sqrt{2} x}{\sqrt{a+\sqrt{1+a^2}}}\right )}{2 \sqrt{2} \sqrt{1+a^2} \sqrt{a+\sqrt{1+a^2}}}+\frac{\tan ^{-1}\left (\frac{\sqrt{-a+\sqrt{1+a^2}}+\sqrt{2} x}{\sqrt{a+\sqrt{1+a^2}}}\right )}{2 \sqrt{2} \sqrt{1+a^2} \sqrt{a+\sqrt{1+a^2}}}-\frac{\log \left (\sqrt{1+a^2}-\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2\right )}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}+\frac{\log \left (\sqrt{1+a^2}+\sqrt{2} \sqrt{-a+\sqrt{1+a^2}} x+x^2\right )}{4 \sqrt{2} \sqrt{1+a^2} \sqrt{-a+\sqrt{1+a^2}}}\\ \end{align*}

Mathematica [C]  time = 0.0310982, size = 52, normalized size = 0.17 \[ -\frac{1}{2} i \left (\frac{\tan ^{-1}\left (\frac{x}{\sqrt{a-i}}\right )}{\sqrt{a-i}}-\frac{\tan ^{-1}\left (\frac{x}{\sqrt{a+i}}\right )}{\sqrt{a+i}}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[(1 + a^2 + 2*a*x^2 + x^4)^(-1),x]

[Out]

(-I/2)*(ArcTan[x/Sqrt[-I + a]]/Sqrt[-I + a] - ArcTan[x/Sqrt[I + a]]/Sqrt[I + a])

________________________________________________________________________________________

Maple [B]  time = 0.155, size = 1073, normalized size = 3.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antideriv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ln(x^2+x*(2*(a^2+1)^(1/2)-2*a)^(1/2)+(a^2+1)^(1/2))*(2*(a^2+1)^(1/2)-2*a)^(1/2)*a^2+1/8/(a^2+1)^(3/2)*ln(x^
2+x*(2*(a^2+1)^(1/2)-2*a)^(1/2)+(a^2+1)^(1/2))*(2*(a^2+1)^(1/2)-2*a)^(1/2)*a^3+1/8/(a^2+1)*ln(x^2+x*(2*(a^2+1)
^(1/2)-2*a)^(1/2)+(a^2+1)^(1/2))*(2*(a^2+1)^(1/2)-2*a)^(1/2)+1/8/(a^2+1)^(3/2)*ln(x^2+x*(2*(a^2+1)^(1/2)-2*a)^
(1/2)+(a^2+1)^(1/2))*(2*(a^2+1)^(1/2)-2*a)^(1/2)*a-1/2/(a^2+1)^(1/2)/(2*(a^2+1)^(1/2)+2*a)^(1/2)*arctan((2*x+(
2*(a^2+1)^(1/2)-2*a)^(1/2))/(2*(a^2+1)^(1/2)+2*a)^(1/2))*a^2+1/2/(a^2+1)^(3/2)/(2*(a^2+1)^(1/2)+2*a)^(1/2)*arc
tan((2*x+(2*(a^2+1)^(1/2)-2*a)^(1/2))/(2*(a^2+1)^(1/2)+2*a)^(1/2))*a^4-1/2/(a^2+1)^(1/2)/(2*(a^2+1)^(1/2)+2*a)
^(1/2)*arctan((2*x+(2*(a^2+1)^(1/2)-2*a)^(1/2))/(2*(a^2+1)^(1/2)+2*a)^(1/2))+3/2/(a^2+1)^(3/2)/(2*(a^2+1)^(1/2
)+2*a)^(1/2)*arctan((2*x+(2*(a^2+1)^(1/2)-2*a)^(1/2))/(2*(a^2+1)^(1/2)+2*a)^(1/2))*a^2+1/(a^2+1)^(3/2)/(2*(a^2
+1)^(1/2)+2*a)^(1/2)*arctan((2*x+(2*(a^2+1)^(1/2)-2*a)^(1/2))/(2*(a^2+1)^(1/2)+2*a)^(1/2))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{x^{4} + 2 \, a x^{2} + a^{2} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4+2*a*x^2+a^2+1),x, algorithm="maxima")

[Out]

integrate(1/(x^4 + 2*a*x^2 + a^2 + 1), x)

________________________________________________________________________________________

Fricas [B]  time = 1.37862, size = 1629, normalized size = 5.45 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4+2*a*x^2+a^2+1),x, algorithm="fricas")

[Out]

1/8*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*(a/sqrt(a^2 + 1) + 1)*log(x^2 + sqrt(2*a^2 - 2*(a^3 + a)/sqrt(
a^2 + 1) + 2)*x/(a^2 + 1)^(1/4) + sqrt(a^2 + 1))/(a^2 + 1)^(1/4) - 1/8*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1)
+ 2)*(a/sqrt(a^2 + 1) + 1)*log(x^2 - sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*x/(a^2 + 1)^(1/4) + sqrt(a^2
+ 1))/(a^2 + 1)^(1/4) - 1/2*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*(a^2 + 1)^(1/4)*arctan(-sqrt(a^4 + 2*a
^2 + 1)*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*x/(a^2 + 1)^(5/4) + (a^3 + a)/sqrt(a^4 + 2*a^2 + 1) + sqrt
(a^4 + 2*a^2 + 1)*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*sqrt(x^2 + sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1
) + 2)*x/(a^2 + 1)^(1/4) + sqrt(a^2 + 1))/(a^2 + 1)^(5/4) - sqrt(a^4 + 2*a^2 + 1)/sqrt(a^2 + 1))/sqrt(a^4 + 2*
a^2 + 1) - 1/2*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*(a^2 + 1)^(1/4)*arctan(-sqrt(a^4 + 2*a^2 + 1)*sqrt(
2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*x/(a^2 + 1)^(5/4) - (a^3 + a)/sqrt(a^4 + 2*a^2 + 1) + sqrt(a^4 + 2*a^2
+ 1)*sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*sqrt(x^2 - sqrt(2*a^2 - 2*(a^3 + a)/sqrt(a^2 + 1) + 2)*x/(a^2
 + 1)^(1/4) + sqrt(a^2 + 1))/(a^2 + 1)^(5/4) + sqrt(a^4 + 2*a^2 + 1)/sqrt(a^2 + 1))/sqrt(a^4 + 2*a^2 + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.496145, size = 48, normalized size = 0.16 \begin{align*} \operatorname{RootSum}{\left (t^{4} \left (256 a^{2} + 256\right ) - 32 t^{2} a + 1, \left ( t \mapsto t \log{\left (64 t^{3} a^{3} + 64 t^{3} a - 4 t a^{2} + 4 t + x \right )} \right )\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x**4+2*a*x**2+a**2+1),x)

[Out]

RootSum(_t**4*(256*a**2 + 256) - 32*_t**2*a + 1, Lambda(_t, _t*log(64*_t**3*a**3 + 64*_t**3*a - 4*_t*a**2 + 4*
_t + x)))

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{x^{4} + 2 \, a x^{2} + a^{2} + 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(x^4+2*a*x^2+a^2+1),x, algorithm="giac")

[Out]

integrate(1/(x^4 + 2*a*x^2 + a^2 + 1), x)